package com.lifeng.fallback;

import com.lifeng.SentinelServiceStart;
import com.lifeng.bean.User;
import com.lifeng.client.UserServiceFeignClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by lifeng on 2018/4/27.
 */
@Component
public class UserServiceFallBack implements UserServiceFeignClient{
    private static final Logger log = LoggerFactory.getLogger(UserServiceFallBack.class);
    @Override
    public User findById(@PathVariable("id") String id) {
        log.error("findById 服务降级了");
        return new User();
    }
}
